<!--{include file='header'}-->
<script language="javascript" src="fck365/fckeditor.js"></script>
<!--{if $act == 'add' or $act=='edit'}-->

<div class="bodytitle">
  <div class="bodytitleleft"></div>
  <div class="bodytitletxt"><span class="nav">
    <!--{if $act == 'add'}-->
    Add
    <!--{else}-->
    Edit
    <!--{/if}-->
    Articles</span></div>
  <div style="float:right; margin-right:5px;"  class="bodytitletxt"><a href="javascript:void(0)" onclick="javascript:history.go(-1)">Back</a></div>
</div>
<form action="<!--{$admin_file}-->?adm=articles&opt=info_do" method="post" name="FORM">
  <table cellspacing="1" cellpadding="10" border="0" bgcolor="#e2f5bc" align="center" width="96%" style="margin-top: 6px;">
    <tbody>
      <tr>
        <td  class="main_bleft">Title:</td>
        <td width="78%"  class="main_bright"><input class="input" name="title" id="title" value="<!--{$doc.title}-->" size="70">
          &nbsp;</td>
      </tr>
      <tr>
        <td  class="main_bleft">Categoey:</td>
        <td width="78%"  class="main_bright"><select name="cid">
            <!--{foreach from=$cates item=d}-->
            <option value="<!--{$d.id}-->"  
            <!--{if $doc.cid==$d.id}-->
            selected
            <!--{/if}-->
            >
            <!--{$d.cname}-->
            </option>
            <!--{/foreach}-->
          </select>
          &nbsp;</td>
      </tr>

      <tr>
        <td   class="main_bleft">Body:</td>
        <td bgcolor="#ffffff" class="main_bright"><textarea name="contents"  ><!--{$doc.contents}-->
</textarea></td>
      </tr>
      <tr style="display:none;">
        <td  class="main_bleft">Other Url:</td>
        <td bgcolor="#ffffff" class="main_bright"><input class="input" name="linkurl" id="linkurl" value="<!--{$doc.linkurl}-->" size="70">
          <span style="color:#FF0000">Format: http://example.com/about.php</span></td>
      </tr>

      <tr>
        <td colspan="2" class="main_btn"><input name="step" type="hidden" id="setp" value="<!--{$act}-->" />
          <input name="id" type="hidden" id="id" value="<!--{$doc.id}-->" />
          <input type="submit" name="Submit" value="Save" class="btn"/>
          <input type="reset" name="Submit2" value="Reset" class="btn" /></td>
      </tr>
    </tbody>
  </table>
  <script language="javascript">

	
	var oFCKeditor = new FCKeditor( 'contents' ) ;
	oFCKeditor.ReplaceTextarea() ;
  </script>
</form>
<!--{else}-->
<div class="bodytitle">
  <div class="bodytitleleft"></div>
  <div class="bodytitletxt">Articles List</div>
  <div style="float:left; margin-left:10px;"  class="bodytitletxt"><a href="<!--{$admin_file}-->?adm=articles&opt=info&act=add<!--{if $cid}-->&cid=<!--{$cid}--><!--{/if}-->" >Add</a></div>
</div>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width='96%' border='0' cellpadding='0' cellspacing='0' align="center" class="tbtitle">
        <tr>
          <td align='center' valign='top'><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr bgcolor="#FFFFFF">
                <td height="4"></td>
              </tr>
            </table>
            <form action="<!--{$admin_file}-->?adm=article&opt=info" method="post" name="form1">
              <table width="100%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="	background:#E2F5BC;">
                <tr class="tr2">
                  <td width="16%" ><strong>No.</strong></td>
                  <td  ><strong>Title</strong></td>
                  <td  ><strong>Publish Date</strong></td>
                  <td width="10%"  ><strong>Category</strong></td>
                  <td width="10%"  ><strong>Operate</strong></td>
                </tr>
                <!--{foreach from=$docs item=d}-->
                <tr class="listtr" >
                  <td valign="middle"><!--{$d.id}--></td>
                  <td align="left" valign="middle" style="padding-left:10px;"><!--{$d.title}--></td>
                  <td width="23%" valign="middle"><!--{$d.addtime|date_format:"%Y-%m-%d %H:%M:%S"}--></td>
                  <td width="23%" valign="middle"><!--{$d.cname}-->
                    &nbsp;</td>
                  <td valign="middle"><a href="<!--{$admin_file}-->?adm=articles&opt=info&act=edit&id=<!--{$d.id}-->"><img src="images/edit.gif" align="absmiddle" alt="<!--{$lang.ico_edit}-->" /></a> <a href="<!--{$admin_file}-->?adm=articles&opt=info&act=del&id=<!--{$d.id}-->"><img src="images/delete_g.gif" align="absmiddle" alt="<!--{$lang.ico_del}-->" /></a></td>
                </tr>
                <!--{/foreach}-->
                <tr align="right" bgcolor="#eaf8ce">
                  <td  colspan="5" align="center">
                    <!--{$pages}--></td>
                </tr>
              </table>
            </form></td>
        </tr>
      </table></td>
  </tr>
</table>
<!--{/if}-->
<!--{include file='footer'}-->
